﻿
#include <iostream>
#include "../../win_com/xx_inline_hook.hpp"
#include "../../win_com/xx_mem.hpp"

int func1(int a,int b)
{
    printf("func1\n");
    return a + b;
}
int func2(int a, int b)
{
    printf("hook ! my func2\n");
    return 123;
}

int main()
{
    xx_mem_unprotect(func1, 4096);
    xx_setjmp64(&func1, &func2);
    int ret =  func1(1,2);
    printf("ret=%d\n",ret);
}


